#pragma once
#include "../global/ResPathConfig.h"
#include "tinyxml2/tinyxml2.h"
#include "cocos2d.h"
USING_NS_CC;
using namespace tinyxml2;

class GameConfigData
{
public:

	static GameConfigData* inst()
	{
		static GameConfigData* instance = new GameConfigData();
		return instance;
	}

	~GameConfigData(void);

	void getData(std::string id, char* data);
	void getData(std::string id, std::string& data);
	void getData(std::string id, int& data);

private:
		GameConfigData(void);

		void loadFile();

		void initXMLData();

private:
	
	tinyxml2::XMLDocument							_doc;
	std::map<std::string, std::string>			_dataList;
};

